home *** CD-ROM | disk | FTP | other *** search
/ Champak Vol A-4 / (Vol A-4) Vol. A4.iso / Games / Word-Safari.swf / scripts / frame_12 / PlaceObject2_227_194 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2008-02-25  |  836b  |  45 lines

  1. onClipEvent(enterFrame){
  2.    this._x += this.dx;
  3.    this._y += this.dy;
  4.    this.dy += this.gravity;
  5.    this.dx *= this.damping;
  6.    this.dy *= this.damping;
  7.    this._rotation = this.dx * 5;
  8.    if(Key.isDown(37) and _root.death == false)
  9.    {
  10.       this.dx -= 0.7;
  11.    }
  12.    if(Key.isDown(39) and _root.death == false)
  13.    {
  14.       this.dx += 0.7;
  15.    }
  16.    if(Key.isDown(38) and _root.death == false)
  17.    {
  18.       this.dy -= 1.5;
  19.    }
  20.    if(Key.isDown(40) and _root.death == false)
  21.    {
  22.       this.dy += 1.5;
  23.    }
  24.    if(this._y > 300)
  25.    {
  26.       this._y = 300;
  27.       this.dy *= -1;
  28.    }
  29.    if(this._y < 0)
  30.    {
  31.       this._y = 0;
  32.       this.dy *= -1;
  33.    }
  34.    if(this._x > 570)
  35.    {
  36.       this._x = 570;
  37.       this.dx *= -1;
  38.    }
  39.    if(this._x < 30)
  40.    {
  41.       this._x = 30;
  42.       this.dx *= -1;
  43.    }
  44. }
  45.